package org.cfx.auth.domain;

import org.cfx.basic.domain.BaseDomain;

import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author cfx
 * @since 2023-09-11
 */
public class AuthPermission extends BaseDomain{

    private static final long serialVersionUID = 1L;

    private Long id;
    private String name;
    private String url;
    private String descs;
    private String sn;
    /**
     * 父级权限的id
     */
    private Long parentId;

    private AuthPermission parent;

    private List<AuthPermission> children;


    public AuthPermission getParent() {
        return parent;
    }

    public void setParent(AuthPermission parent) {
        this.parent = parent;
    }

    public List<AuthPermission> getChildren() {
        return children;
    }

    public void setChildren(List<AuthPermission> children) {
        this.children = children;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getDescs() {
        return descs;
    }

    public void setDescs(String descs) {
        this.descs = descs;
    }

    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    @Override
    public String toString() {
        return "AuthPermission{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", url='" + url + '\'' +
                ", descs='" + descs + '\'' +
                ", sn='" + sn + '\'' +
                ", parentId=" + parentId +
                ", parent=" + parent +
                ", children=" + children +
                '}';
    }
}
